package gui.impianto;
import com.toedter.calendar.JDateChooser;

import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import javax.swing.BorderFactory;
import javax.swing.ImageIcon;
import javax.swing.JButton;

import javax.swing.WindowConstants;
import javax.swing.border.BevelBorder;
import javax.swing.border.TitledBorder;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTextArea;
import javax.swing.JTextField;

/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class ShowListaManutenzioniJPanel extends javax.swing.JPanel {

	{
		//Set Look & Feel
		try {
			javax.swing.UIManager.setLookAndFeel("com.jgoodies.looks.plastic.PlasticXPLookAndFeel");
		} catch(Exception e) {
			e.printStackTrace();
		}
	}

	private JPanel infojPanel;
	private JButton chiudijButton;
	private JButton aggiungijButton;
	private JButton eliminajButton;
	private JTable manutenzionijTable;
	private JScrollPane tablejScrollPane;
	private JButton dettaglijButton;
	private JPanel pulsantijPanel;
	private JPanel manutenzionejPanel;
	private JLabel impiantojLabel;
	private JLabel comuneImpiantojLabel;
	private JLabel indirizzoImpiantojLabel;
	private JLabel clientejLabel;
	private JLabel logojLabel;
	private JPanel logojPanel;
	
	private String matricolaImpianto;

	/**
	* Auto-generated main method to display this 
	* JPanel inside a new JFrame.
	*/
	public static void main(String[] args) {
		JFrame frame = new JFrame();
		frame.getContentPane().add(new ShowListaManutenzioniJPanel("HHGTH"));
		frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
		frame.pack();
		frame.setVisible(true);
	}
	
	public ShowListaManutenzioniJPanel(String matricola) {
		super();
		this.matricolaImpianto = matricola;
		initGUI();
	}
	
	private void initGUI() {
		try {
			this.setPreferredSize(new java.awt.Dimension(412, 361));
			{
				infojPanel = new JPanel();
				GridBagLayout infojPanelLayout = new GridBagLayout();
				this.add(infojPanel);
				infojPanel.setPreferredSize(new java.awt.Dimension(244, 135));
				infojPanel.setBorder(BorderFactory.createTitledBorder("Info Impianto"));
				infojPanelLayout.rowWeights = new double[] {0.1, 0.1, 0.1, 0.1};
				infojPanelLayout.rowHeights = new int[] {7, 7, 7, 7};
				infojPanelLayout.columnWeights = new double[] {0.1};
				infojPanelLayout.columnWidths = new int[] {7};
				infojPanel.setLayout(infojPanelLayout);
				{
					clientejLabel = new JLabel();
					infojPanel.add(clientejLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
					clientejLabel.setText("Cognome Nome (id)");
					clientejLabel.setFont(new java.awt.Font("Segoe UI",3,12));
				}
				{
					indirizzoImpiantojLabel = new JLabel();
					infojPanel.add(indirizzoImpiantojLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
					indirizzoImpiantojLabel.setText("Via Indirizzo Impianto, numero");
					indirizzoImpiantojLabel.setFont(new java.awt.Font("Segoe UI",3,12));
				}
				{
					comuneImpiantojLabel = new JLabel();
					infojPanel.add(comuneImpiantojLabel, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
					comuneImpiantojLabel.setText("CAP - Comune Impianto (PR)");
					comuneImpiantojLabel.setFont(new java.awt.Font("Segoe UI",3,12));
				}
				{
					impiantojLabel = new JLabel();
					infojPanel.add(impiantojLabel, new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
					impiantojLabel.setText("Matricola Modello (Costruttore)");
					impiantojLabel.setFont(new java.awt.Font("Segoe UI",3,12));
				}
			}
			{
				logojPanel = new JPanel();
				this.add(logojPanel);
				logojPanel.setPreferredSize(new java.awt.Dimension(140, 134));
				{
					logojLabel = new JLabel();
					logojPanel.add(logojLabel);
					logojLabel.setIcon(new ImageIcon(getClass().getClassLoader().getResource("images/icons/manutenzione128.png")));
				}
			}
			{
				manutenzionejPanel = new JPanel();
				FlowLayout manutenzionejPanelLayout = new FlowLayout();
				this.add(manutenzionejPanel);
				manutenzionejPanel.setPreferredSize(new java.awt.Dimension(389, 154));
				manutenzionejPanel.setLayout(manutenzionejPanelLayout);
				manutenzionejPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createTitledBorder(""), "Manutenzioni", TitledBorder.LEADING, TitledBorder.DEFAULT_POSITION));
				{
					tablejScrollPane = new JScrollPane();
					manutenzionejPanel.add(tablejScrollPane);
					tablejScrollPane.setPreferredSize(new java.awt.Dimension(365, 114));
					{
						TableModel manutenzionijTableModel = 
								new DefaultTableModel(
										new String[][] { { "One", "Two" }, { "Three", "Four" } },
										new String[] { "Column 1", "Column 2" });
						manutenzionijTable = new JTable();
						tablejScrollPane.setViewportView(manutenzionijTable);
						manutenzionijTable.setModel(manutenzionijTableModel);
					}
				}
			}
			{
				pulsantijPanel = new JPanel();
				this.add(pulsantijPanel);
				pulsantijPanel.setPreferredSize(new java.awt.Dimension(383, 45));
				{
					dettaglijButton = new JButton();
					pulsantijPanel.add(dettaglijButton);
					dettaglijButton.setText("Dettagli");
					dettaglijButton.setIcon(new ImageIcon(getClass().getClassLoader().getResource("images/icons/detail32.png")));
				}
				{
					aggiungijButton = new JButton();
					pulsantijPanel.add(aggiungijButton);
					aggiungijButton.setText("Aggiungi");
					aggiungijButton.setIcon(new ImageIcon(getClass().getClassLoader().getResource("images/icons/add32.png")));
				}
				{
					eliminajButton = new JButton();
					pulsantijPanel.add(eliminajButton);
					eliminajButton.setText("Elimina");
					eliminajButton.setIcon(new ImageIcon(getClass().getClassLoader().getResource("images/icons/del32.png")));
				}
				{
					chiudijButton = new JButton();
					pulsantijPanel.add(chiudijButton);
					chiudijButton.setText("Chiudi");
					chiudijButton.setIcon(new ImageIcon(getClass().getClassLoader().getResource("images/icons/close32.png")));
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
